﻿#ifndef ROLEDIALOG_H
#define ROLEDIALOG_H

#include <QDialog>
#include <QSqlDatabase>
#include "dbutil.h"
#include "../model/role.h"
#include <QMessageBox>

namespace Ui {
class RoleDialog;
}

class RoleDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RoleDialog(QWidget *parent = nullptr);
    ~RoleDialog();

public:
    void init(Role role);

private:
    Ui::RoleDialog *ui;
    Role m_role;

private slots:
    void on_cancel();
    void on_submit();
};

#endif // ROLEDIALOG_H
